﻿package mortal.game.view.friend.data
{
    import com.mui.controls.*;
    import mortal.component.gconst.*;
    import mortal.game.view.common.*;

    public class FriendSetInfoSpr extends GSprite
    {
        private var _label:GTextFiled;
        private var _value:GTextFiled;
        private var _img:GImageBitmap;

        public function FriendSetInfoSpr()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._label = UIFactory.gTextField("", 0, 0, 65, 20, this);
            this._value = UIFactory.gTextField("", 58, 0, 70, 20, this);
            this._img = UIFactory.gImageBitmap("", 59, 0, this);
            return;
        }// end function

        public function clear() : void
        {
            this._value.text = "";
            this._img.imgUrl = "";
            return;
        }// end function

        public function updateValue(param1:String, param2:Boolean = false) : void
        {
            if (param2)
            {
                this._value.htmlText = param1;
            }
            else
            {
                this._value.text = param1;
            }
            return;
        }// end function

        public function get value() : String
        {
            return this._value.text;
        }// end function

        public function set isGray(param1:Boolean) : void
        {
            if (param1)
            {
                this._value.filters = [FilterConst.colorFilter2];
            }
            else
            {
                this._value.filters = [];
            }
            return;
        }// end function

        public function set label(param1:String) : void
        {
            this._label.text = param1;
            return;
        }// end function

        public function setWidth(param1:int) : void
        {
            this._value.width = param1;
            return;
        }// end function

        public function set img(param1:String) : void
        {
            this._img.imgUrl = param1;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._label.dispose(param1);
            this._value.dispose(param1);
            this._img.dispose();
            this._label = null;
            this._value = null;
            this._img = null;
            return;
        }// end function

    }
}
